<?php

/**
 * Description of ajaxhandler
 *
 * @author Jiles
 */
require_once("../libs/includes.php");
    $controller  = new Controller();


    switch ($_POST['method'])
    {
        case "addMovieForUser":
            $controller->getMovieController()->addMovieForUser($_POST['userid'], $_POST['movieid']);
            break;

        case "removeMovieForUser":
            $controller->getMovieController()->removeMovieForUser($_POST['userid'], $_POST['movieid']);
            break;

        case "login":
           echo $controller->getUserController()->login($_POST['username'], $_POST['password']);
           break;
           
    }
?>
